#ifndef __CHARGE_H_
#define __CHARGE_H_

#include "headfile.h"

#define PIN_CHARGE_V ADC_P05
#define PIN_CHARGE_I ADC_P06
#define PIN_CHARGE_CAP ADC_P11
#define PIN_CHARGE_PWM PWM8_P77

extern volatile float AD_V_power,AD_I_power,AD_CapV_power;
extern volatile float Control_Integral,Control_Out;
extern volatile float Now_Power,Target_Power;
extern volatile float Max_Cap_Voltage;
extern volatile float Power_p,Power_i;
extern uint8 Flag_power;

void charge_adc_read(void);
void charge_power_control(void);
void charge_init(void);
void charge_exe(void);
void charge_lcd_msg(void);
void charge_parameter(float p,float i,float t);
void charge_show(void);

#endif